feat(desktop): add back and forward history menus - #6858
Draft
matt2e wants to merge 5 commits into
Draft
Conversation
matt2e
marked this pull request as draft
August 26, 2026 05:41
matt2e
force-pushed
the
jitter/back-history-menu
branch
from
August 28, 2026 00:45
cea3f22 to
25a8579
Compare
🔐 Codex Security Review
|
Co-authored-by: Jitter <d14dfe033ef0f809866f9f984de04821b0d900d7652fd85a54776ee40ca3a68f@buzz.block.builderlab.xyz> Signed-off-by: Matt Toohey <contact@matttoohey.com>
Co-authored-by: Jitter <d14dfe033ef0f809866f9f984de04821b0d900d7652fd85a54776ee40ca3a68f@buzz.block.builderlab.xyz> Signed-off-by: Matt Toohey <contact@matttoohey.com>
Co-authored-by: Jitter <d14dfe033ef0f809866f9f984de04821b0d900d7652fd85a54776ee40ca3a68f@buzz.block.builderlab.xyz> Signed-off-by: Matt Toohey <contact@matttoohey.com>
Resolves the review comments on the back/forward history menus.
A `replace: true` navigation mints a fresh __TSR_key at the *same*
history index, which the old heuristic read as "the forward stack was
truncated". Mid-history replaces — the huddle redirects, settings
section switches, `goHome({ replace: true })` — therefore wiped the
tracked forward entries and disabled the forward control even though
`history.go(1)` still worked. Only a push moves the index forward, so
truncation now keys off an index that advanced past a stale entry.
The fold is extracted as a pure `recordHistoryVisit` reducer so the
push/replace/traverse cases are unit-testable without a renderer.
Also:
- Route labels move to a table that falls back to the raw pathname. The
old chain ended in `return "Inbox"`, so any future route would have
shown up in the menus as the inbox with nothing to flag the omission.
- The right-click vs long-press E2E now compares menu geometry and item
text instead of raw screenshot bytes; a mismatch names the field that
drifted rather than handing back an opaque Buffer diff.
The reported left-click-while-open double action does not reproduce:
Radix's modal dismiss layer sets `pointer-events: none` on the body, so
the click lands on the layer and never reaches the button — one click
dismisses and nothing else, matching the native control. Locked in with
an E2E case that also proves the next click still navigates.
Verified: pnpm typecheck, pnpm check, pnpm test (5517 pass),
check:file-sizes, and the navigation smoke spec (21 pass, 1 pre-existing
fixme).
Signed-off-by: Matt Toohey <contact@matttoohey.com>
AppShell.tsx crossed the 1000-line desktop ratchet again after the forward-history wiring. Move the community destination restore effect into its own hook alongside useCommunityNavigationTransitions instead of squeezing the call site further. Signed-off-by: Matt Toohey <contact@matttoohey.com>
matt2e
force-pushed
the
jitter/back-history-menu
branch
from
August 28, 2026 05:43
25a8579 to
9f53f25
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
pnpm test(5,513 passed)pnpm typecheckpnpm checkpnpm build:e2eCI=1 playwright test tests/e2e/navigation.spec.ts --project=smoke(20 passed, 1 pre-existing fixme skipped)